<template>
  <view
    class="app-config-provider"
    :style="store.themeVariables"
    :class="{ 'je-theme-page': themePage, ...store.themeClass }"
  >
    <slot></slot>
    <je-modal ref="modalRef" />
  </view>
</template>
<script>
  /**
   * 系统配置
   * 支持主题，拦截器，多语言
   * 请将页面的根节点换成config-provider组件，每个以只允许有一个
   */
  import { useConfigProvider } from './hooks';
  export default {
    name: 'ConfigProvider',
    props: {
      i18nTitle: { type: Boolean, default: true },
      themePage: { type: Boolean, default: true },
      tokenGuard: { type: Boolean, default: true },
    },
    setup(props, context) {
      return useConfigProvider({ props, context });
    },
  };
</script>
